information = function(){
	var oldPhone;
	var oldEmail;
	//姓名
	var studentName ={
			width: 250,
			xtype: 'displayfield',
			id: 'studentName',labelWidth:60,
			fieldLabel: '姓名'	
		}
	//学号
	var studentId ={
			width: 250,labelWidth:60,
			xtype: 'displayfield',
			id: 'studentId',
			fieldLabel: '学号'
		}
	//性别
	var studentSex ={
			width: 250,labelWidth:60,
			xtype: 'displayfield',
			id: 'studentSex',
			fieldLabel: '性别'
		} 
	//学院
	var studentAcademy ={
			width: 200,labelWidth:60,
			xtype: 'displayfield',
			id: 'studentAcademy',
			fieldLabel: '学院'	
		}
	//专业
	var studentProfessionnal ={
			width: 250,labelWidth:60,
			xtype: 'displayfield',
			id: 'studentProfessionnal',
			fieldLabel: '专业'	
		}
	//年级
	var studentGrade ={
			width: 250,labelWidth:60,
			xtype: 'displayfield',
			id: 'studentGrade',
			fieldLabel: '年级'	
		}
	//班级
	var studentClass ={
			width: 250,labelWidth:60,
			xtype: 'displayfield',
			id: 'studentClass',
			fieldLabel: '班级'	
		}
	//辅导员
	var studentTeach ={
			width: 250,labelWidth:60,
			xtype: 'displayfield',
			id: 'studentTeach',
			fieldLabel: '辅导员'	
		}
	//电话
	var studentPhone ={
			width: 250,labelWidth:60,
			xtype: 'textfield',
			id: 'studentPhone',
			fieldLabel: '电话'	
		}
	//邮箱
	var studentEmail ={
			width: 250,labelWidth:60,
			xtype: 'textfield',
			id: 'studentEmail',
			fieldLabel: '邮箱'	
		}
	
	//生日
	var studentBirth = {
        xtype: 'datefield',
        anchor: '100%',
        fieldLabel: '出生日期',
        id: 'studentBirth',
        format: 'Y-m-d',
        width: 250,labelWidth:60,
        maxValue: new Date()  // limited to the current date or prior
    }
	
	//民族
	var studentNational ={
			width: 250,labelWidth:60,
			xtype: 'displayfield',
			id: 'studentNational',
			fieldLabel: '民族'	
		}
	//政治面貌
	var studentPoliticalStatus ={
			width: 250,labelWidth:60,
			xtype: 'displayfield',
			id: 'studentPoliticalStatus',
			fieldLabel: '政治面貌'	
		}
	//籍贯
	var studentNativePlace ={
			width: 250,labelWidth:60,
			xtype: 'textfield',
			id: 'studentNativePlace',
			fieldLabel: '籍贯'	
	}
	//身份证号码
	var studentCardId ={
			width: 250,labelWidth:60,
			xtype: 'textfield',
			id: 'studentCardId',
			fieldLabel: '身份证号'	
		}
	//宿舍地址
	var studentDorm ={
			width: 250,labelWidth:60,
			xtype: 'textareafield',
			id: 'studentDorm',
			rows:1,
			fieldLabel: '宿舍地址'	
		}
	//爱好
	var studentHobby ={
			width: 200,labelWidth:60,
			xtype: 'textareafield',
			id: 'studentHobby',
			rows:3,
			fieldLabel: '爱好'	
		}
	//特长
	var studentSpecialty ={
			width: 200,labelWidth:60,
			xtype: 'textareafield',
			id: 'studentSpecialty',
			rows:3,
			fieldLabel: '特长'	
		}
	//备注
	var studentRemark ={
			width: 500,labelWidth:60,
			xtype: 'textareafield',
			id: 'studentRemark',
			rows:3,
			fieldLabel: '备注'	
		}
	
	//第一列
	var column1 = {
	        columnWidth: .60,
	       // height:150,
	        layout: 'form',
	        labelAlign : 'right',
	        /*layout: "table",   
	        layoutConfig: {   
	            columns: 2   
	        },*/ 
	        labelWidth:40,
	        defaults:
            {                     
                layout: 'anchor', 
                defaults: {   anchor: '100%'  } 
            },
	        xtype:'panel',
	        border:true,
	        
	        style:'margin-left:50px;margin-top:50px',
	        items: [{
	            layout: "column",
	            items: [
					studentName, 
					studentId
	                   ]
	        },{
	            layout: "column",
	            items: [
					studentSex,
					studentNational
	                   ]
	        },{
	            layout: "column",
	            items: [
					studentPoliticalStatus,
					studentAcademy
	                   ]
	        },{
	            layout: "column",
	            items: [
					studentProfessionnal, 
					studentGrade
	                   ]
	        },{
	            layout: "column",
	            items: [
					studentClass,
					studentTeach
	                   ]
	        },{
	            layout: "column",
	            items: [
	                    studentPhone, 
		                studentEmail
	                   ]
	        },{
	            layout: "column",
	            items: [
					studentBirth,
					studentNativePlace
	                   ]
	        },{
	            layout: "column",
	            items: [
	                    studentCardId,
		                studentDorm
	                   ]
	        },studentHobby,studentSpecialty,studentRemark
 
	     ]
		};
	//第二列
	/*var column2 = {
	        columnWidth: .30,
	      //  height:150,
	        layout: 'form',
	        xtype:'panel',
	        border:false,
	        style:'margin-left:50px;margin-top:50px',
	        items: [
	                studentAcademy,
	                studentProfessionnal, 
	                studentGrade, 
	                studentClass,
	                studentTeach
	                ]
		};*/
	
	//创建相片div组件
    var imagebox = {
    	xtype:'panel',
    	width:80,
    	height:100,
    	style: 'clear:both;margin-left:37px;border:1px solid blue; margin-bottom:8px',
    	items:[{
        xtype: 'box',
        id:'studentImage',
        autoEl: {
            width: 80,   
            height:100,
            tag: 'img'
            
           }
    	//src:'Image/logo.jpg'
    	}
    	]
    };
 
    //上传按钮
    var uploadselect = {
        xtype: 'fileuploadfield',
        width:130,
        emptyText: '请选择上传文件',
        name: 'upload', 
        buttonConfig: { 
            text: '选择'
        }
    };
    
    //第3列
    var column3 = new Ext.FormPanel({
        columnWidth: .23,
        id:'studentPhotoFrom',
        fileUpload: true,
        enctype: 'multipart/form-data',
        border:0,
        buttonAlign: 'center',
        //layout: 'form',
        style:'margin-left:45px;margin-top:50px;',
        items: [imagebox,uploadselect,{
        	layout: 'column',
        	border:0,
        	items:[
        	       {
        	       	xtype:'button',
        	       	text:'上传',
        	        width:60,
        	       	handler: function(){ 
                        if(column3.getForm().isValid()){ 
                        	column3.getForm().submit({ 
                                url:'updateStudentPhotoAction.action', 
                                method:'POST', 
                                waitTitle: '请稍后', 
                                waitMsg: '正在上传文档文件 ...', 
                                success: function(fp, action){ 
                                	if(action.result.success){
	                                    Ext.MessageBox.alert('信息', "上传成功");   
	                                    Ext.getCmp('studentImage').getEl().dom.src = action.result.photoPath;
	                                   
	                                    Ext.getCmp('delet').setDisabled(false);
                                	}else{
                                		 Ext.MessageBox.alert('警告', action.result.msg);  
                                	}
                                }, 
                                failure: function(fp, action){ 
                                    Ext.MessageBox.alert('警告', action.result.message);   
                                } 
                            }); 
                        }else{
                        	Ext.MessageBox.alert('提示', '数据校验不通过！');  
                        }
                        
        	       }
        	       },{
        	    	   xtype:'button',
        	    	   text:'删除',
        	    	   width:60,
        	    	   id:'delet',
        	    	   style:'margin-left:10px',
        	    	   handler:function(){
        	    		   Ext.MessageBox.confirm('提示', '确定删除图片吗？', Delete);
        	    	   }
        	       }
        	       ]
        	},
        ]      
    });
     //表单
		    var form = {
		        frame: true,  
		        xtype: 'form',
		        iconCls: 'nodeicon',
		        title: '个人信息',
		       
		       // width: 850,
		        //height: 570,
		        //labelWidth: 150,
		        buttonAlign: 'center',
		        labelAlign : 'right',
		        items: [{
		            layout: 'column',
		            items: [
		                        column1,
		                      //  column2,
		            	       	column3
		                       
		                    ]
		        	}],
		        buttons: [{
		        	xtype : "button",
		            text: '保存',
		            handler: sumbit
		        }]
		    };
		    Ext.Ajax.request( {
		    	url : "qryStudentInfoByIdAction.action", 
		    	params : {
		    		
		    	}, //参数
		    	success : function(response, option) {
		    		
		    		var obj = Ext.decode(response.responseText);
		    		Ext.getCmp("studentName").setValue(obj.list[0].studentName);
		    		Ext.getCmp("studentId").setValue(obj.list[0].studentId);
		    		Ext.getCmp("studentSex").setValue(obj.list[0].sex);
		    		obj.list[0].photo != null ? Ext.getCmp('studentImage').getEl().dom.src= obj.list[0].photo:"";
		    		//Ext.getCmp('studentImage').getEl().dom.src= obj.list[0].photo;
		    		//Ext.Msg.alert("失败", Ext.getCmp('studentImage').getEl().dom.src);
		    		
		    		if(obj.list[0].photo == '' || obj.list[0].photo == null){
		    			Ext.getCmp('delet').setDisabled(true);
		    		}
		    		Ext.getCmp('studentPhone').setValue(obj.list[0].phone);
		    		Ext.getCmp('studentEmail').setValue(obj.list[0].email);
		    		//Ext.getCmp('studentImage').setValue();
		    		// Ext.getCmp('studentImage').getEl().dom.src = obj.list[0].phone;
		    		Ext.getCmp('studentAcademy').setValue(obj.list[0].academy);
		    		Ext.getCmp('studentProfessionnal').setValue(obj.list[0].professional);
		    		Ext.getCmp('studentGrade').setValue(obj.list[0].grade);
		    		Ext.getCmp('studentClass').setValue(obj.list[0].inclass);
		    		Ext.getCmp('studentTeach').setValue(obj.list[0].counselor);//COUNSELOR
		    		//Ext.Msg.alert("失败", obj.list[0].birth);
		    		Ext.getCmp('studentBirth').setValue(new Date(obj.list[0].birth));
		    		
		    		Ext.getCmp('studentPoliticalStatus').setValue(obj.list[0].politicalStatus);
		    		Ext.getCmp('studentNational').setValue(obj.list[0].national);
		    		Ext.getCmp('studentNativePlace').setValue(obj.list[0].nativePlace);
		    		Ext.getCmp('studentCardId').setValue(obj.list[0].cardId);
		    		Ext.getCmp('studentDorm').setValue(obj.list[0].dorm);
		    		Ext.getCmp('studentHobby').setValue(obj.list[0].hobby);
		    		Ext.getCmp('studentSpecialty').setValue(obj.list[0].specialty);
		    		Ext.getCmp('studentRemark').setValue(obj.list[0].remark);
		    		
		    		/*oldPhone = obj.list[0].phone;
		    		oldEmail = obj.list[0].email;*/
		    	},
		    	failure : function(response, option) {
		    		Ext.Msg.alert("失败", "系统错误");
		    	}
		    	});
		    function Delete(btn){
		   
		    	if(btn == 'yes'){
		    		Ext.Ajax.request( {
	    		    	url : "deleteStudentPhotoAction.action", 
	    		    	params : {
	    		    		
	    		    	}, //参数
	    		    	success : function(response, option) {
	    		    		var success = Ext.decode(response.responseText).success; 
	    		    		if(success){
	    		    			Ext.getCmp('studentImage').getEl().dom.src= "";
	    		    			Ext.Msg.alert("提示", "图片删除成功！");
	    		    			Ext.getCmp('delet').setDisabled(true);
	    		    		}else{
	    		    			Ext.Msg.alert("失败",  Ext.decode(response.responseText).msg);
	    		    		}
	    		    		
	    		    	},
	    		    	failure : function(response, option) {
	    		    		Ext.Msg.alert("失败", "系统错误");
	    		    	}
	    		    	});
		    	}else{
		    		return ;
		    	}
		    	
		    };
		    //------------事件处理方法开始-------------//
		    //提交
		    function sumbit() {
		    	var phone = Ext.getCmp('studentPhone').getValue();
		    	var email = Ext.getCmp('studentEmail').getValue();
		    	var birth = Ext.getCmp('studentBirth').getValue();
		    	var politicalStatus = Ext.getCmp('studentPoliticalStatus').getValue();
	    		var national = Ext.getCmp('studentNational').getValue();
	    		var nativePlace = Ext.getCmp('studentNativePlace').getValue();
	    		var cardId = Ext.getCmp('studentCardId').getValue();
	    		var dorm = Ext.getCmp('studentDorm').getValue();
	    		var hobby = Ext.getCmp('studentHobby').getValue();
	    		var specialty = Ext.getCmp('studentSpecialty').getValue();
	    		var remark = Ext.getCmp('studentRemark').getValue();
		    	/*if(phone == oldPhone && email == oldEmail){
		    		Ext.Msg.alert("提示", "没有修改，无需保存！");
		    		return;
		    	}*/
		    	var p = /^1[3578]\d{9}$/;  
		    	var e = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/;  
		    	if(!p.test(phone)){
		    		Ext.Msg.alert("提示", "手机号码格式不正确！");
		    		return;
		    	}
		    	if(!e.test(email)){
		    		Ext.Msg.alert("提示", "邮箱格式不正确！");
		    		return;
		    	}
		       
		    	
		    	
		    	Ext.Ajax.request( {
		    		url : "updateStudentInfoAction.action", 
		    		params : {
		    			phone: phone,
		    			email:email,
		    			birth:birth,
		    			politicalStatus:politicalStatus,
		    			national:national,
		    		    nativePlace:nativePlace,
		    		    cardId:cardId,
		    		    dorm:dorm,
		    		    hobby:hobby,
		    		    specialty:specialty,
		    		    remark:remark
		    		}, //参数
		    		success : function(response, option) {
		    			var obj = Ext.decode(response.responseText);
		    			if(obj.success){
		    				Ext.Msg.alert("提示", "保存成功");
		    			}
		    			else{
		    				Ext.Msg.alert("提示", obj.msg);
		    			}
		    			
		    		},
		    		failure : function(response, option) {
		    			Ext.Msg.alert("提示", "保存失败");
		    		}
		    		});
		    		
		    }
		    

		    //------------事件处理方法结束-------------//
		    //返回表单
		    return form;
	
	
	
	
	
	
	
	
}